package com.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.handler.annotation.MessageExceptionHandler;
import org.springframework.web.bind.annotation.ControllerAdvice;

//
@Configuration
@ControllerAdvice
public class CustomExceptionResolverAdvisor {

    @MessageExceptionHandler(value = {Exception.class})
    public String handleExceptionForException(Exception e){
        return e.getMessage();
    }
}
